unsigned short belookup[4][256][4] = 
{
   {0},
   {
/*0*/	{0x0,	0x0},
/*1*/	{0x5,	0x3},
/*2*/	{0xa,	0xc},
/*3*/	{0xf,	0xf}
   },
   {
/*0*/	{0x0,	0x0,	0x0},
/*1*/	{0x11,	0x5,	0x3},
/*2*/	{0x22,	0xa,	0xc},
/*3*/	{0x33,	0xf,	0xf},
/*4*/	{0x44,	0x50,	0x30},
/*5*/	{0x55,	0x55,	0x33},
/*6*/	{0x66,	0x5a,	0x3c},
/*7*/	{0x77,	0x5f,	0x3f},
/*8*/	{0x88,	0xa0,	0xc0},
/*9*/	{0x99,	0xa5,	0xc3},
/*a*/	{0xaa,	0xaa,	0xcc},
/*b*/	{0xbb,	0xaf,	0xcf},
/*c*/	{0xcc,	0xf0,	0xf0},
/*d*/	{0xdd,	0xf5,	0xf3},
/*e*/	{0xee,	0xfa,	0xfc},
/*f*/	{0xff,	0xff,	0xff}
   },
   {
/*0*/	{0x0,	0x0,	0x0,	0x0},
/*1*/	{0x101,	0x11,	0x5,	0x3},
/*2*/	{0x202,	0x22,	0xa,	0xc},
/*3*/	{0x303,	0x33,	0xf,	0xf},
/*4*/	{0x404,	0x44,	0x50,	0x30},
/*5*/	{0x505,	0x55,	0x55,	0x33},
/*6*/	{0x606,	0x66,	0x5a,	0x3c},
/*7*/	{0x707,	0x77,	0x5f,	0x3f},
/*8*/	{0x808,	0x88,	0xa0,	0xc0},
/*9*/	{0x909,	0x99,	0xa5,	0xc3},
/*a*/	{0xa0a,	0xaa,	0xaa,	0xcc},
/*b*/	{0xb0b,	0xbb,	0xaf,	0xcf},
/*c*/	{0xc0c,	0xcc,	0xf0,	0xf0},
/*d*/	{0xd0d,	0xdd,	0xf5,	0xf3},
/*e*/	{0xe0e,	0xee,	0xfa,	0xfc},
/*f*/	{0xf0f,	0xff,	0xff,	0xff},
/*10*/	{0x1010,	0x1100,	0x500,	0x300},
/*11*/	{0x1111,	0x1111,	0x505,	0x303},
/*12*/	{0x1212,	0x1122,	0x50a,	0x30c},
/*13*/	{0x1313,	0x1133,	0x50f,	0x30f},
/*14*/	{0x1414,	0x1144,	0x550,	0x330},
/*15*/	{0x1515,	0x1155,	0x555,	0x333},
/*16*/	{0x1616,	0x1166,	0x55a,	0x33c},
/*17*/	{0x1717,	0x1177,	0x55f,	0x33f},
/*18*/	{0x1818,	0x1188,	0x5a0,	0x3c0},
/*19*/	{0x1919,	0x1199,	0x5a5,	0x3c3},
/*1a*/	{0x1a1a,	0x11aa,	0x5aa,	0x3cc},
/*1b*/	{0x1b1b,	0x11bb,	0x5af,	0x3cf},
/*1c*/	{0x1c1c,	0x11cc,	0x5f0,	0x3f0},
/*1d*/	{0x1d1d,	0x11dd,	0x5f5,	0x3f3},
/*1e*/	{0x1e1e,	0x11ee,	0x5fa,	0x3fc},
/*1f*/	{0x1f1f,	0x11ff,	0x5ff,	0x3ff},
/*20*/	{0x2020,	0x2200,	0xa00,	0xc00},
/*21*/	{0x2121,	0x2211,	0xa05,	0xc03},
/*22*/	{0x2222,	0x2222,	0xa0a,	0xc0c},
/*23*/	{0x2323,	0x2233,	0xa0f,	0xc0f},
/*24*/	{0x2424,	0x2244,	0xa50,	0xc30},
/*25*/	{0x2525,	0x2255,	0xa55,	0xc33},
/*26*/	{0x2626,	0x2266,	0xa5a,	0xc3c},
/*27*/	{0x2727,	0x2277,	0xa5f,	0xc3f},
/*28*/	{0x2828,	0x2288,	0xaa0,	0xcc0},
/*29*/	{0x2929,	0x2299,	0xaa5,	0xcc3},
/*2a*/	{0x2a2a,	0x22aa,	0xaaa,	0xccc},
/*2b*/	{0x2b2b,	0x22bb,	0xaaf,	0xccf},
/*2c*/	{0x2c2c,	0x22cc,	0xaf0,	0xcf0},
/*2d*/	{0x2d2d,	0x22dd,	0xaf5,	0xcf3},
/*2e*/	{0x2e2e,	0x22ee,	0xafa,	0xcfc},
/*2f*/	{0x2f2f,	0x22ff,	0xaff,	0xcff},
/*30*/	{0x3030,	0x3300,	0xf00,	0xf00},
/*31*/	{0x3131,	0x3311,	0xf05,	0xf03},
/*32*/	{0x3232,	0x3322,	0xf0a,	0xf0c},
/*33*/	{0x3333,	0x3333,	0xf0f,	0xf0f},
/*34*/	{0x3434,	0x3344,	0xf50,	0xf30},
/*35*/	{0x3535,	0x3355,	0xf55,	0xf33},
/*36*/	{0x3636,	0x3366,	0xf5a,	0xf3c},
/*37*/	{0x3737,	0x3377,	0xf5f,	0xf3f},
/*38*/	{0x3838,	0x3388,	0xfa0,	0xfc0},
/*39*/	{0x3939,	0x3399,	0xfa5,	0xfc3},
/*3a*/	{0x3a3a,	0x33aa,	0xfaa,	0xfcc},
/*3b*/	{0x3b3b,	0x33bb,	0xfaf,	0xfcf},
/*3c*/	{0x3c3c,	0x33cc,	0xff0,	0xff0},
/*3d*/	{0x3d3d,	0x33dd,	0xff5,	0xff3},
/*3e*/	{0x3e3e,	0x33ee,	0xffa,	0xffc},
/*3f*/	{0x3f3f,	0x33ff,	0xfff,	0xfff},
/*40*/	{0x4040,	0x4400,	0x5000,	0x3000},
/*41*/	{0x4141,	0x4411,	0x5005,	0x3003},
/*42*/	{0x4242,	0x4422,	0x500a,	0x300c},
/*43*/	{0x4343,	0x4433,	0x500f,	0x300f},
/*44*/	{0x4444,	0x4444,	0x5050,	0x3030},
/*45*/	{0x4545,	0x4455,	0x5055,	0x3033},
/*46*/	{0x4646,	0x4466,	0x505a,	0x303c},
/*47*/	{0x4747,	0x4477,	0x505f,	0x303f},
/*48*/	{0x4848,	0x4488,	0x50a0,	0x30c0},
/*49*/	{0x4949,	0x4499,	0x50a5,	0x30c3},
/*4a*/	{0x4a4a,	0x44aa,	0x50aa,	0x30cc},
/*4b*/	{0x4b4b,	0x44bb,	0x50af,	0x30cf},
/*4c*/	{0x4c4c,	0x44cc,	0x50f0,	0x30f0},
/*4d*/	{0x4d4d,	0x44dd,	0x50f5,	0x30f3},
/*4e*/	{0x4e4e,	0x44ee,	0x50fa,	0x30fc},
/*4f*/	{0x4f4f,	0x44ff,	0x50ff,	0x30ff},
/*50*/	{0x5050,	0x5500,	0x5500,	0x3300},
/*51*/	{0x5151,	0x5511,	0x5505,	0x3303},
/*52*/	{0x5252,	0x5522,	0x550a,	0x330c},
/*53*/	{0x5353,	0x5533,	0x550f,	0x330f},
/*54*/	{0x5454,	0x5544,	0x5550,	0x3330},
/*55*/	{0x5555,	0x5555,	0x5555,	0x3333},
/*56*/	{0x5656,	0x5566,	0x555a,	0x333c},
/*57*/	{0x5757,	0x5577,	0x555f,	0x333f},
/*58*/	{0x5858,	0x5588,	0x55a0,	0x33c0},
/*59*/	{0x5959,	0x5599,	0x55a5,	0x33c3},
/*5a*/	{0x5a5a,	0x55aa,	0x55aa,	0x33cc},
/*5b*/	{0x5b5b,	0x55bb,	0x55af,	0x33cf},
/*5c*/	{0x5c5c,	0x55cc,	0x55f0,	0x33f0},
/*5d*/	{0x5d5d,	0x55dd,	0x55f5,	0x33f3},
/*5e*/	{0x5e5e,	0x55ee,	0x55fa,	0x33fc},
/*5f*/	{0x5f5f,	0x55ff,	0x55ff,	0x33ff},
/*60*/	{0x6060,	0x6600,	0x5a00,	0x3c00},
/*61*/	{0x6161,	0x6611,	0x5a05,	0x3c03},
/*62*/	{0x6262,	0x6622,	0x5a0a,	0x3c0c},
/*63*/	{0x6363,	0x6633,	0x5a0f,	0x3c0f},
/*64*/	{0x6464,	0x6644,	0x5a50,	0x3c30},
/*65*/	{0x6565,	0x6655,	0x5a55,	0x3c33},
/*66*/	{0x6666,	0x6666,	0x5a5a,	0x3c3c},
/*67*/	{0x6767,	0x6677,	0x5a5f,	0x3c3f},
/*68*/	{0x6868,	0x6688,	0x5aa0,	0x3cc0},
/*69*/	{0x6969,	0x6699,	0x5aa5,	0x3cc3},
/*6a*/	{0x6a6a,	0x66aa,	0x5aaa,	0x3ccc},
/*6b*/	{0x6b6b,	0x66bb,	0x5aaf,	0x3ccf},
/*6c*/	{0x6c6c,	0x66cc,	0x5af0,	0x3cf0},
/*6d*/	{0x6d6d,	0x66dd,	0x5af5,	0x3cf3},
/*6e*/	{0x6e6e,	0x66ee,	0x5afa,	0x3cfc},
/*6f*/	{0x6f6f,	0x66ff,	0x5aff,	0x3cff},
/*70*/	{0x7070,	0x7700,	0x5f00,	0x3f00},
/*71*/	{0x7171,	0x7711,	0x5f05,	0x3f03},
/*72*/	{0x7272,	0x7722,	0x5f0a,	0x3f0c},
/*73*/	{0x7373,	0x7733,	0x5f0f,	0x3f0f},
/*74*/	{0x7474,	0x7744,	0x5f50,	0x3f30},
/*75*/	{0x7575,	0x7755,	0x5f55,	0x3f33},
/*76*/	{0x7676,	0x7766,	0x5f5a,	0x3f3c},
/*77*/	{0x7777,	0x7777,	0x5f5f,	0x3f3f},
/*78*/	{0x7878,	0x7788,	0x5fa0,	0x3fc0},
/*79*/	{0x7979,	0x7799,	0x5fa5,	0x3fc3},
/*7a*/	{0x7a7a,	0x77aa,	0x5faa,	0x3fcc},
/*7b*/	{0x7b7b,	0x77bb,	0x5faf,	0x3fcf},
/*7c*/	{0x7c7c,	0x77cc,	0x5ff0,	0x3ff0},
/*7d*/	{0x7d7d,	0x77dd,	0x5ff5,	0x3ff3},
/*7e*/	{0x7e7e,	0x77ee,	0x5ffa,	0x3ffc},
/*7f*/	{0x7f7f,	0x77ff,	0x5fff,	0x3fff},
/*80*/	{0x8080,	0x8800,	0xa000,	0xc000},
/*81*/	{0x8181,	0x8811,	0xa005,	0xc003},
/*82*/	{0x8282,	0x8822,	0xa00a,	0xc00c},
/*83*/	{0x8383,	0x8833,	0xa00f,	0xc00f},
/*84*/	{0x8484,	0x8844,	0xa050,	0xc030},
/*85*/	{0x8585,	0x8855,	0xa055,	0xc033},
/*86*/	{0x8686,	0x8866,	0xa05a,	0xc03c},
/*87*/	{0x8787,	0x8877,	0xa05f,	0xc03f},
/*88*/	{0x8888,	0x8888,	0xa0a0,	0xc0c0},
/*89*/	{0x8989,	0x8899,	0xa0a5,	0xc0c3},
/*8a*/	{0x8a8a,	0x88aa,	0xa0aa,	0xc0cc},
/*8b*/	{0x8b8b,	0x88bb,	0xa0af,	0xc0cf},
/*8c*/	{0x8c8c,	0x88cc,	0xa0f0,	0xc0f0},
/*8d*/	{0x8d8d,	0x88dd,	0xa0f5,	0xc0f3},
/*8e*/	{0x8e8e,	0x88ee,	0xa0fa,	0xc0fc},
/*8f*/	{0x8f8f,	0x88ff,	0xa0ff,	0xc0ff},
/*90*/	{0x9090,	0x9900,	0xa500,	0xc300},
/*91*/	{0x9191,	0x9911,	0xa505,	0xc303},
/*92*/	{0x9292,	0x9922,	0xa50a,	0xc30c},
/*93*/	{0x9393,	0x9933,	0xa50f,	0xc30f},
/*94*/	{0x9494,	0x9944,	0xa550,	0xc330},
/*95*/	{0x9595,	0x9955,	0xa555,	0xc333},
/*96*/	{0x9696,	0x9966,	0xa55a,	0xc33c},
/*97*/	{0x9797,	0x9977,	0xa55f,	0xc33f},
/*98*/	{0x9898,	0x9988,	0xa5a0,	0xc3c0},
/*99*/	{0x9999,	0x9999,	0xa5a5,	0xc3c3},
/*9a*/	{0x9a9a,	0x99aa,	0xa5aa,	0xc3cc},
/*9b*/	{0x9b9b,	0x99bb,	0xa5af,	0xc3cf},
/*9c*/	{0x9c9c,	0x99cc,	0xa5f0,	0xc3f0},
/*9d*/	{0x9d9d,	0x99dd,	0xa5f5,	0xc3f3},
/*9e*/	{0x9e9e,	0x99ee,	0xa5fa,	0xc3fc},
/*9f*/	{0x9f9f,	0x99ff,	0xa5ff,	0xc3ff},
/*a0*/	{0xa0a0,	0xaa00,	0xaa00,	0xcc00},
/*a1*/	{0xa1a1,	0xaa11,	0xaa05,	0xcc03},
/*a2*/	{0xa2a2,	0xaa22,	0xaa0a,	0xcc0c},
/*a3*/	{0xa3a3,	0xaa33,	0xaa0f,	0xcc0f},
/*a4*/	{0xa4a4,	0xaa44,	0xaa50,	0xcc30},
/*a5*/	{0xa5a5,	0xaa55,	0xaa55,	0xcc33},
/*a6*/	{0xa6a6,	0xaa66,	0xaa5a,	0xcc3c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0xcc22,	0xf00a,	0xf00c},
/*c3*/	{0xc3c3,	0xcc33,	0xf00f,	0xf00f},
/*c4*/	{0xc4c4,	0xcc44,	0xf050,	0xf030},
/*c5*/	{0xc5c5,	0xcc55,	0xf055,	0xf033},
/*c6*/	{0xc6c6,	0xcc66,	0xf05a,	0xf03c},
/*c7*/	{0xc7c7,	0xcc77,	0xf05f,	0xf03f},
/*c8*/	{0xc8c8,	0xcc88,	0xf0a0,	0xf0c0},
/*c9*/	{0xc9c9,	0xcc99,	0xf0a5,	0xf0c3},
/*ca*/	{0xcaca,	0xccaa,	0xf0aa,	0xf0cc},
/*cb*/	{0xcbcb,	0xccbb,	0xf0af,	0xf0cf},
/*cc*/	{0xcccc,	0xcccc,	0xf0f0,	0xf0f0},
/*cd*/	{0xcdcd,	0xccdd,	0xf0f5,	0xf0f3},
/*ce*/	{0xcece,	0xccee,	0xf0fa,	0xf0fc},
/*cf*/	{0xcfcf,	0xccff,	0xf0ff,	0xf0ff},
/*d0*/	{0xd0d0,	0xdd00,	0xf500,	0xf300},
/*d1*/	{0xd1d1,	0xdd11,	0xf505,	0xf303},
/*d2*/	{0xd2d2,	0xdd22,	0xf50a,	0xf30c},
/*d3*/	{0xd3d3,	0xdd33,	0xf50f,	0xf30f},
/*d4*/	{0xd4d4,	0xdd44,	0xf550,	0xf330},
/*d5*/	{0xd5d5,	0xdd55,	0xf555,	0xf333},
/*d6*/	{0xd6d6,	0xdd66,	0xf55a,	0xf33c},
/*d7*/	{0xd7d7,	0xdd77,	0xf55f,	0xf33f},
/*d8*/	{0xd8d8,	0xdd88,	0xf5a0,	0xf3c0},
/*d9*/	{0xd9d9,	0xdd99,	0xf5a5,	0xf3c3},
/*da*/	{0xdada,	0xddaa,	0xf5aa,	0xf3cc},
/*db*/	{0xdbdb,	0xddbb,	0xf5af,	0xf3cf},
/*dc*/	{0xdcdc,	0xddcc,	0xf5f0,	0xf3f0},
/*dd*/	{0xdddd,	0xdddd,	0xf5f5,	0xf3f3},
/*de*/	{0xdede,	0xddee,	0xf5fa,	0xf3fc},
/*df*/	{0xdfdf,	0xddff,	0xf5ff,	0xf3ff},
/*e0*/	{0xe0e0,	0xee00,	0xfa00,	0xfc00},
/*e1*/	{0xe1e1,	0xee11,	0xfa05,	0xfc03},
/*e2*/	{0xe2e2,	0xee22,	0xfa0a,	0xfc0c},
/*e3*/	{0xe3e3,	0xee33,	0xfa0f,	0xfc0f},
/*e4*/	{0xe4e4,	0xee44,	0xfa50,	0xfc30},
/*e5*/	{0xe5e5,	0xee55,	0xfa55,	0xfc33},
/*e6*/	{0xe6e6,	0xee66,	0xfa5a,	0xfc3c},
/*e7*/	{0xe7e7,	0xee77,	0xfa5f,	0xfc3f},
/*e8*/	{0xe8e8,	0xee88,	0xfaa0,	0xfcc0},
/*e9*/	{0xe9e9,	0xee99,	0xfaa5,	0xfcc3},
/*ea*/	{0xeaea,	0xeeaa,	0xfaaa,	0xfccc},
/*eb*/	{0xebeb,	0xeebb,	0xfaaf,	0xfccf},
/*ec*/	{0xecec,	0xeecc,	0xfaf0,	0xfcf0},
/*ed*/	{0xeded,	0xeedd,	0xfaf5,	0xfcf3},
/*ee*/	{0xeeee,	0xeeee,	0xfafa,	0xfcfc},
/*ef*/	{0xefef,	0xeeff,	0xfaff,	0xfcff},
/*f0*/	{0xf0f0,	0xff00,	0xff00,	0xff00},
/*f1*/	{0xf1f1,	0xff11,	0xff05,	0xff03},
/*f2*/	{0xf2f2,	0xff22,	0xff0a,	0xff0c},
/*f3*/	{0xf3f3,	0xff33,	0xff0f,	0xff0f},
/*f4*/	{0xf4f4,	0xff44,	0xff50,	0xff30},
/*f5*/	{0xf5f5,	0xff55,	0xff55,	0xff33},
/*f6*/	{0xf6f6,	0xff66,	0xff5a,	0xff3c},
/*f7*/	{0xf7f7,	0xff77,	0xff5f,	0xff3f},
/*f8*/	{0xf8f8,	0xff88,	0xffa0,	0xffc0},
/*f9*/	{0xf9f9,	0xff99,	0xffa5,	0xffc3},
/*fa*/	{0xfafa,	0xffaa,	0xffaa,	0xffcc},
/*fb*/	{0xfbfb,	0xffbb,	0xffaf,	0xffcf},
/*fc*/	{0xfcfc,	0xffcc,	0xfff0,	0xfff0},
/*fd*/	{0xfdfd,	0xffdd,	0xfff5,	0xfff3},
/*fe*/	{0xfefe,	0xffee,	0xfffa,	0xfffc},
/*ff*/	{0xffff,	0xffff,	0xffff,	0xffff}
   }
};
